<div class="entry header">
	<div class="head">
		<div class="left">Title : <?php echo ucfirst($this->qcm->titre)?></div>
		<div class="right"><a href="<?php echo $this->url(array('module'=>'prof','controller'=>'qcm','action'=>'edit','qcm'=>$this->qcm->id),'default',true)?>">Edit</a> - <a href="<?php echo $this->url(array('module'=>'prof','controller'=>'qcm','action'=>'delete','qcm'=>$this->qcm->id),'default',true)?>">Delete</a> - <a href="<?php echo $this->url(array('module'=>'prof','controller'=>'qcm','action'=>'unlink','qcm'=>$this->qcm->id),'default',true)?>">Unlink</a></div>
	</div>
	<div class="bottom"><?php echo $this->qcm->description?></div>
</div>
<div class="indexLinks"><a href="<?php echo $this->url(array('module'=>'prof','controller'=>'quest','action'=>'add','qcm'=>$this->qcm->id),'default',true)?>">Add a question</a></div>
<div id="questList">
<?php foreach($this->entries as $entry):?>
<div class="entry">
	<div class="head">
		<div class="left"><?php echo $entry->num_quest.' | '.$entry->enonce?></div>
		<div class="right"><?php echo count($entry->reponses)?> answers</div>
	</div>
	<div class="bottom"><a href="<?php echo $this->url(array('module'=>'prof','controller'=>'quest','action'=>'view','qcm'=>$entry->id_qcm,'quest'=>$entry->num_quest),'default',true)?>"></a></div>
</div>
<?php endforeach;?>
</div>
<?php echo $this->paginationControl($this->entries, 'Elastic', 'pagination_controll.phtml')?>

<?php $this->headScript()->appendScript('$(document).ready(function(){
	$("#questList .entry").click(function(){
		window.location=$(this).find(".bottom a").attr("href"); return false;
	});
	$("#questList .entry").hover(function(){
		$(this).css("cursor","pointer");
	}, function(){
		$(this).css("cursor","auto");
	});
});')?>